package com.king.base.domain.menu;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.king.base.domain.base.BaseEntity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author TianYZ
 * @date 2019-06-15
 */
@TableName("base_menu")
public class Menu extends BaseEntity {
    @TableId
    private String menuId; //菜单ID

    private String menuName; //菜单名称

    private String parentId; //上级菜单ID

    private Integer sort; //菜单排序

    private String path; // 路由地址

    private String component; // 组件路径

    private String isFrame; // 是否外联 0是1否

    private String menuType; //类型（M目录 C菜单 F按钮）

    private String visible; //是否可见 0显示,1隐藏

    private String permission; //权限字符串

    private String icon; //图标

    private boolean keepAlive; //是否缓存

    @TableField(exist = false)
    private List<Menu> children=new ArrayList<>(); //子菜单

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getIsFrame() {
        return isFrame;
    }

    public void setIsFrame(String isFrame) {
        this.isFrame = isFrame;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    public boolean isKeepAlive() {
        return keepAlive;
    }

    public void setKeepAlive(boolean keepAlive) {
        this.keepAlive = keepAlive;
    }
}
